package org.dxy.domain.event.process;

import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * @description: 工序步骤变更事件
 * 该事件表示工序步骤发生跳转、跳步、返工等流程调整
 * @author: dxy
 * @createTime: 2025/6/22 23:47
 */
public record ProcessStepChangedEvent(
        /**
         * 工序ID
         */
        Long processId,

        /**
         * 原步骤ID
         */
        Long fromStepId,

        /**
         * 目标步骤ID
         */
        Long toStepId
) implements DomainEvent {
    
    @Override
    public Long aggregateId() {
        return processId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.PROCESS.getKey();
    }
    
    @Override
    public String eventType() {
        return ProcessEventTypeEnum.STEP_CHANGED.getKey();
    }
} 